package pl.edu.agh.jemo.conf.types;

import java.util.ArrayList;
import java.util.List;

import pl.edu.agh.jemo.evolution.operator.crossover.Crossover;
import pl.edu.agh.jemo.evolution.operator.crossover.impl.EmptyCrossover;
import pl.edu.agh.jemo.evolution.operator.crossover.impl.LinearCrossover;
import pl.edu.agh.jemo.evolution.operator.crossover.impl.Radial2DCrossover;

/**
 * Class dedicated to list all available crossover types.
 * It is used by user interface, in order to help user choosing a crossover to be used by algorithm.
 * 
 * @author Marcin.Zbijowski
 *
 */
public class CrossoverTypesHandler {
	
	/**
	 * Returns collection of all available implemented crossovers in jemo.
	 * Returned object is java.util.List, containing references to classes being implementation of Crossover interface.
	 * This method should be updated when adding new crossover operators.
	 * 
	 * @return List of objects representing classes of available crossovers
	 */
	public static List<PrintableType<? extends Crossover>> getCrossoverTypes() {
		List<PrintableType<? extends Crossover>> classes = new ArrayList<PrintableType<? extends Crossover>>();
		classes.add(new PrintableType<EmptyCrossover>(EmptyCrossover.class, "Empty crossover"));
		classes.add(new PrintableType<LinearCrossover>(LinearCrossover.class, "Linear crossover"));
		classes.add(new PrintableType<Radial2DCrossover>(Radial2DCrossover.class, "Radial crossover (2D)"));
		return classes;
	}
}
